// pages/cut/component/list/list.js
import {getVideoList} from '../../../../api/file'
Component({

  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    list:[],
  },
  lifetimes:{
    created(){
      console.log("show")
      this.getList()
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handlePreview(event){
      console.log(event)
      const item = event.currentTarget.dataset.item
      console.log(item)
      this.triggerEvent("updateUri",{...item})
    },
    getList(){
      wx.showLoading({
        title: '加载中...',
      })
      getVideoList({pageNum:1,pageSize:100}).then(res => {
        wx.hideLoading()
        this.setData({
          list: res.data.records
        })
      })
    }
  } 
})